/* eslint-disable */
const { resolve } = require('path');
HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    //单入口
    // entry: './src/index.js',
    //多入口
    entry: {
        index: './src/index.js',
        other: './src/other.js',
    },
    output: {
        filename: 'js/[name].[contenthash:10].js',
        path: resolve(__dirname, 'build'),
    },

    plugins: [
        new HtmlWebpackPlugin({
            template: './src/index.html',
            minify: {
                collapseWhitespace: true,
                removeComments: true,
            },
        }),
    ],
    mode: 'production',
};
